package com.atguigu.springcloud.alibaba.controller.service.impl;

import com.atguigu.springcloud.alibaba.controller.service.ElectricMotor;
import com.atguigu.springcloud.alibaba.controller.service.Motor;

/**
 * @Author: Fanw
 * @Date: 2021/4/18 14:02
 * @Description:
 */
public class ElectricAdapter implements Motor {
    private ElectricMotor emotor;


    public ElectricAdapter() {
        emotor = new ElectricMotor();
    }

    public ElectricAdapter(ElectricMotor emotor) {
        this.emotor = emotor;
    }

    @Override
    public void drive() {
        emotor.electricDrive();
    }
}
